import request from '@/utils/request'

// 查询表扩展列表
export function listTable(query) {
  return request({
    url: '/system/table/list',
    method: 'get',
    params: query
  })
}

// tb_ 开头的表
export function getDbList(query) {
  return request({
    url: '/system/table/db/list',
    method: 'get',
    params: query
  })
}

// 导入库中表
export function importTable(data) {
  return request({
    url: '/system/table/importTable',
    method: 'post',
    params: data
  })
}

export function getInfoByName(query){
  return request({
    url: '/system/table/infoByName',
    method: 'get',
    params: query
  })
}

// 查询表扩展详细
export function getTable(id) {
  return request({
    url: '/system/table/' + id,
    method: 'get'
  })
}

// 新增表扩展
export function addTable(data) {
  return request({
    url: '/system/table',
    method: 'post',
    data: data
  })
}

// 修改表扩展
export function updateTable(data) {
  return request({
    url: '/system/table',
    method: 'put',
    data: data
  })
}

// 删除表扩展
export function delTable(id) {
  return request({
    url: '/system/table/' + id,
    method: 'delete'
  })
}
